

/***********************************************************************
 * @file:        xxx.c
 * @author:      guangjieMVP
 * @version:     v1.00.00
 * @date:        2020-xx-xx
 * @github:      https://github.com/guangjieMVP
 * @brief: 
***********************************************************************/
#ifndef _STACK_WITH_WITH_CHECK_H_
#define _STACK_WITH_WITH_CHECK_H_

#include "stack.h"

typedef struct _stack_check
{
    stack_t super;                                  //父类
    int (*check)(struct _stack_check *s,int vola);   //抽象方法
}stack_check_t;

int stack_check_init(stack_check_t *s, int *s_buffer, int size, int (*check)(struct _stack_check *s,int vol));
int stack_check_deinit(stack_check_t *s);
int stack_check_push(stack_check_t *s, int val);
int stack_check_pop(stack_check_t *s, int *val);


#endif